package com.hermit.qmst.UI.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.hermit.qmst.R;
import com.hermit.qmst.tools.Common;

/**
 * Created by Administrator on 2016/9/27 0027.
 */
public class RechargeActivity extends Activity implements View.OnClickListener {
    private RelativeLayout mlySelf;
    private TextView tv_rctype;
    private Context context;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recharge_way);
        context = RechargeActivity.this;
        initUI();
    }

    private void initUI() {
        mlySelf = (RelativeLayout) findViewById(R.id.rlyt_self);
        tv_rctype = (TextView) findViewById(R.id.tv_rctype);
        ((TextView) findViewById(R.id.tv_title)).setText("充值");
        ((ImageView) findViewById(R.id.iv_title_left)).setImageResource(R.drawable.ic_back);
        findViewById(R.id.iv_title_left).setOnClickListener(this);
        tv_rctype.setText(Common.myPhone);
        mlySelf.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rlyt_self:
                Intent intent = new Intent();
                intent.setClass(context, PayCardActivity.class);
                startActivity(intent);
                overridePendingTransition(R.anim.fling_in_right2left, R.anim.fling_out_left2right);
                break;
            case R.id.iv_title_left:
                finish();
                break;
        }
    }
}
